#import "sprite_game_enemy_lifebar.h"

@implementation SpriteGameEnemyLifeBar

@synthesize back = back_;
@synthesize front = front_;

- (id)initSpriteGameEnemyLifeBar
{
	if ((self = [super init]))
	{
		back_ = [[CCSprite alloc] initWithFile:@"enemy_life_back.png"];
		[self addChild:back_];
		[back_ release];
		front_ = [[CCProgressTimer alloc] initWithFile:@"enemy_life_front.png"];
		[self addChild:front_];
		[front_ release];
		front_.type = kCCProgressTimerTypeHorizontalBarLR;
		front_.percentage = 100.0f;
	}
	return self;
}

- (void)SetPersent:(float)Persent
{
	front_.percentage = Persent;
}

@end
